﻿using System;
using System.Collections.Generic;
using System.Net;
using System.Text;
using UtilZ.Dotnet.Ex.Communication.Base;

namespace UtilZ.Dotnet.Ex.Communication.Net.Base
{
    /// <summary>
    /// 连接状态改变事件参数
    /// </summary>
    public class NetConnectedChangedArgs : ConnectionChangedArgsAbs
    {
        /// <summary>
        /// 本地EndPoint
        /// </summary>
        public EndPoint LocalEndPoint { get; private set; }

        /// <summary>
        /// 对方EndPoint
        /// </summary>
        public EndPoint RemoteEndPoint { get; private set; }




        /// <summary>
        /// 构造函数
        /// </summary>
        /// <param name="status">状态[true:连接已建立;false:连接断开]</param>
        /// <param name="localEndPoint">本地EndPoint</param>
        /// <param name="remoteEndPoint">对方EndPoint</param>
        public NetConnectedChangedArgs(ConnectionStatus status, EndPoint localEndPoint, EndPoint remoteEndPoint)
            : base(status)
        {
            this.LocalEndPoint = localEndPoint;
            this.RemoteEndPoint = remoteEndPoint;
        }
    }
}
